package com.mmp.main.servlet.systemsettings;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.mmp.common.servlet.BasicServlet;
import com.mmp.main.entity.HospitalOperatingCompany;

public class OperatingCompanyProfileDisplayServlet extends BasicServlet {

	public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		request.setAttribute("operatingCompanyProfile", getOperatingCompanyBean(request));
		forward(request, response, "systemsettings/OperatingCompanyProfile.jsp");
	}

	private HospitalOperatingCompany getOperatingCompanyBean(HttpServletRequest request) {
		
		return getSessionUser(request).getHospital().getHospitalOperatingCompany();

/*		HospitalOperatingCompany comp = dbm.findById(1, HospitalOperatingCompany.class);
		dbm.destory();
		return comp;*/
	}
}
